package com.mc.read.adminapi.controller;

import com.mc.read.adminapi.service.AdvertisingService;
import com.mc.read.vo.request.BaseRequest;
import com.mc.read.vo.respose.BaseRespose;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author liuhao
 * @date 2019/6/26 15:31
 */
@Controller
@RequestMapping(value = "/verify/advertising")
@Slf4j
public class AdvertisingController {
    @Autowired
    AdvertisingService advertisingService;

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 查询广告列表 selectAdverList
     **/
    @ResponseBody
    @RequestMapping(value = "selectAdverList", method = RequestMethod.POST)
    public BaseRespose selectAdverList(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = advertisingService.selectAdverList(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 修改广告信息 updateAdver
     **/
    @ResponseBody
    @RequestMapping(value = "updateAdver", method = RequestMethod.POST)
    public BaseRespose updateAdver(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = advertisingService.updateAdver(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 查询热门品论 selectHot
     **/
    @ResponseBody
    @RequestMapping(value = "selectHot", method = RequestMethod.POST)
    public BaseRespose selectHot(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = advertisingService.selectHot(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 修改热门品论 updateHot
     **/
    @ResponseBody
    @RequestMapping(value = "updateHot", method = RequestMethod.POST)
    public BaseRespose updateHot(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = advertisingService.updateHot(baseRequest);
        return baseRespose;
    }


}
